﻿app.controller('MenuController', ['$scope', 'PizzaService', function ($scope, PizzaService) {
    $scope.pizzas = [];

    return PizzaService.getPizzas().then(function (data) {
        for (var p in data) {
            var pizza = data[p];
            $scope.pizzas.push(pizza);
        }
    }, function () {
        alert("Sorry couldn't get your pizzas :(");
    });
}]);